package top.tangyh.lamp.care.common;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum TimeTypeEnum {
    //时间点
    TIME_POINT("1", "时间点"),
    //时间段
    TIME_RANGE("2", "时间类型");

    private String typeCode;

    private String typeName;

    public static  TimeTypeEnum forValue(String typeCode){
        for (TimeTypeEnum value : values()) {
            if(value.getTypeCode().equals(typeCode)){
                return value;
            }
        }
        return null;
    }

}
